package myutils
{
	import flash.system.Capabilities;

	public class PxChangeUtils
	{
		public function PxChangeUtils()
		{
		}
		
		/**
		 * Convert inches to pixels.
		 */
		public static function inchesToPixels(inches:Number):uint
		{
			return Math.round(Capabilities.screenDPI * inches);
		}
		
		/**
		 * Convert millimeters to pixels.
		 */
		public static function mmToPixels(mm:Number):uint
		{
			return Math.round(Capabilities.screenDPI * (mm / 25.4));
		}
		
		/**
		 * Convert millimeters to pixels.
		 */
		public static function dpToPx(dp:Number):uint
		{
			return Math.round((dp/160)*Capabilities.screenDPI);
		}
	}
}